package com.game.messagebean.common;

import com.baidu.bjf.remoting.protobuf.FieldType;
import com.baidu.bjf.remoting.protobuf.annotation.Protobuf;
import com.game.message.jpb.SuperJPB;
import org.springframework.stereotype.Component;

/**
 * 提示类消息
 * Created by Administrator on 2016/7/5.
 */
@Component
public class PromptResp extends SuperJPB {
	public static final int INFO = 1;
	public static final int ALERT = 2;
	public static final int ERROR = 3;
	public static final int ROLL = 4;

	public PromptResp() {
	}

	/**
	 * 消息类型，1=普通提示，2=警告，3=错误，4=滚动
	 */
	@Protobuf(fieldType = FieldType.INT32, order = 101, required = true)
	private int type;
	@Protobuf(fieldType = FieldType.STRING, order = 102, required = true)
	private String message;
	@Protobuf(fieldType = FieldType.STRING, order = 103, required = true)
	private String picUrl;


	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public PromptResp(int type, String message) {
		this.type = type;
		this.message = message;
	}

	public PromptResp(int type, String message, String picUrl) {
		this.type = type;
		this.message = message;
		this.picUrl = picUrl;
	}

	public static PromptResp getNormalPrompt(int type, String message) {
		return new PromptResp(type, message);
	}

	public static PromptResp getPicPrompt(int type, String message, String picUrl) {
		return new PromptResp(type, message, picUrl);
	}
}
